﻿<Window x:Class="WpfFeeCalculator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       
        Title="MainWindow" Height="550" Width="750">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  Source="Resources\MainWindowResource.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
        
    </Window.Resources>

    <Window.DataContext>
        <Binding Mode="OneWay" Path="MainVM" Source="{StaticResource MainViewModelLocatorDataSource}"/>
    </Window.DataContext>
    
    <DockPanel>
        <DockPanel DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None">
            <Menu KeyboardNavigation.TabNavigation="Cycle">
                <MenuItem Header="_File">
                    <MenuItem Header="Fee _Calculation" Command="{Binding Path=NewCalculateCommand}" />
                    <MenuItem Header="More Fees" Command="{Binding Path=MoreFeesCommand}" />
                    <MenuItem Header="Manage _Reference Data"  />
                    <MenuItem Header="E_xit"  Command="{Binding Path=CloseCommand}"/>
                </MenuItem>
                <MenuItem Header="_Tools">
                    <MenuItem Header="_Upload Exposures"  />
                </MenuItem>
                <MenuItem Header="_Help" />
            </Menu>
            
        </DockPanel>
        <Grid Margin="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border        Grid.Column="0"         Style="{StaticResource MainBorderStyle}" >
            <TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Workspaces}" 
                        ItemTemplate="{StaticResource ClosableTabItemTemplate}" 
                        Margin="4"  />
            </Border>
        </Grid>
    </DockPanel>
</Window>
